package newcharacter;

import java.util.function.Consumer;
import java.util.function.Supplier;

/**JDK8添加的新特性*/
public class TestDemo{
    public static void main(String[] args) {
        test1(()-> System.out.println("无参无返回值"));
        String s = "1";
        System.out.println("1".intern() == "1");
    }
   static void test1(T1 t1){
        t1.accept();
    }
}
interface T1{
    void accept();
    static void fn(){
        System.out.println(11);
    }
    /*default T1 andThen(T1 num2){
        return (int a)-> {accept();num2.accept();};
    }*/
}
